﻿<?xml version="1.0"?>
<CodeConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Handlers>
		<ProjectHandler Parser="NArrange.Core.MSBuildProjectParser">
			<!-- List of handled project extensions -->
			<ProjectExtensions>
				<Extension Name="csproj"/>
				<Extension Name="vbproj"/>
			</ProjectExtensions>
		</ProjectHandler>
		<ProjectHandler Parser="NArrange.Core.MonoDevelopProjectParser">
			<ProjectExtensions>
				<Extension Name="mdp"/>
			</ProjectExtensions>
		</ProjectHandler>
		<!-- Source handlers are plugins that help NArrange parse and write source files -->
		<SourceHandler Language="CSharp" Assembly="NArrange.CSharp, Version=0.2.8.0, Culture=neutral, PublicKeyToken=null">
			<!-- List of handled source file extensions -->
			<SourceExtensions>
				<Extension Name="cs">
					<Filter Condition="!($(File.Name) : '.Designer.')"/>
				</Extension>
				<!-- If your project uses other extensions for C# files add them here-->
			</SourceExtensions>
		</SourceHandler>
		<SourceHandler Language="VisualBasic" Assembly="NArrange.VisualBasic, Version=0.2.8.0, Culture=neutral, PublicKeyToken=null">
			<SourceExtensions>
				<Extension Name="vb">
					<Filter Condition="!($(File.Name) : '.Designer.')"/>
				</Extension>
			</SourceExtensions>
		</SourceHandler>
	</Handlers>
	<!--For encoding, Codepage can be any of the following:
		"Detect"  - Detect file encodings (NArrange default) 
		"Default" - Use the system default ANSI encoding (e.g. CodePage 1252 Western-European)
		CodePage  - e.g. "65001" for UTF-8
	 -->
	<Encoding CodePage="Detect"/>
	<Formatting>
		<Tabs Style="Tabs" SpacesPerTab="4"/>
		<ClosingComments Enabled="false" Format="End $(ElementType) $(Name)"/>
		<Regions EndRegionNameEnabled="true" Style="Default"
				 CommentDirectiveBeginPattern="^\s?\$\(\s?Begin\s?\)\s?(?&lt;Name&gt;.*)$"
				 CommentDirectiveEndPattern="^\s?\$\(\s?End\s?\)\s?(?&lt;Name&gt;.*)?$"
				 CommentDirectiveBeginFormat=" $(Begin) {0}"
				 CommentDirectiveEndFormat=" $(End) {0}"/>
	</Formatting>
	<Elements>
		<Region Name="Header">
			<Elements>
				<Element Type="Comment">
					<!-- File header comments -->
					<Filter Condition="$(Type) != 'XmlLine'"/>
				</Element>
			</Elements>
		</Region>
		<Element Type="Using">
			<Group By="Name" AttributeCapture="^(.*?)(\.|$)" SeparatorType="NewLine"/>
			<Sort By="Name"/>
		</Element>
		<!-- End Using -->
		<Element Type="Attribute"/>
		<Element Id="DefaultConditional"  Type="ConditionDirective">
			<Elements>
				<ElementRef Id="DefaultNamespace"/>
				<ElementRef Id="DefaultInterface"/>
				<ElementRef Id="DefaultType"/>
				<Element>
					<Sort By="Name"/>
				</Element>
			</Elements>
		</Element>
		<ElementRef Id="DefaultInterface"/>
		<ElementRef Id="DefaultType"/>
		<Element Id="DefaultNamespace" Type="Namespace">
			<Sort By="Name"/>
			<Elements>
				<Element Type="Using">
					<Group By="Name" AttributeCapture="^(.*?)(\.|$)" SeparatorType="NewLine"/>
					<Sort By="Name"/>
				</Element>
				<ElementRef Id="DefaultConditional"/>
				<Region Name="Enumerations">
					<Elements>
						<Element Type="Type">
							<Sort By="Name"/>
							<Filter Condition="$(Type) == 'Enum'"/>
						</Element>
					</Elements>
				</Region>
				<Region Name="Delegates">
					<Elements>
						<Element Type="Delegate">
							<Sort By="Name"/>
						</Element>
					</Elements>
				</Region>
				<Element Id="DefaultInterface"  Type="Type">
					<!-- Interfaces only -->
					<Sort By="Access">
						<Sort By="Name"/>
					</Sort>
					<Filter Condition="$(Type) == 'Interface'"/>
					<Elements>
						<ElementRef Id="DefaultConditional"/>
						<Region Name="Properties">
							<Elements>
								<Element Type="Property">
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Methods">
							<Elements>
								<Element Type="Method">
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Events">
							<Elements>
								<Element Type="Event">
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Other">
							<Elements>
								<Element>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
					</Elements>
				</Element>
				<!-- End Interface -->
				<Element Id="DefaultType" Type="Type">
					<!-- Classes and structures -->
					<Sort By="Access">
						<Sort By="Name"/>
					</Sort>
					<Elements>
						<ElementRef Id="DefaultConditional"/>
						<Region Name="Constants">
							<Elements>
								<Element Type="Field">
									<Filter Condition="$(Modifier) : 'Constant'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Static Fields">
							<Elements>
								<Element Type="Field">
									<Filter Condition="$(Modifier) : 'Static'"/>
									<!-- Do not sort statics due to dependencies among fields -->
								</Element>
							</Elements>
						</Region>
						<Region Name="Fixed Fields">
							<Elements>
								<Element Type="Field">
									<Filter Condition="$(Parent.Attributes) : 'StructLayout'"/>
									<!-- Do not sort fields that are members of a type with a StructLayout attribute -->
								</Element>
							</Elements>
						</Region>
						<Region Name="Fields">
							<Elements>
								<Element Type="Field">
									<Group By="Access" SeparatorType="NewLine"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Constructors">
							<Elements>
								<Element Type="Constructor">
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Private Properties">
							<Elements>
								<Element Type="Property">
									<Filter Condition="$(Access) == 'Private' Or $(Access) == 'None'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Protected Properties">
							<Elements>
								<Element Type="Property">
									<Filter Condition="$(Access) == 'Protected'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Internal Properties">
							<Elements>
								<Element Type="Property">
									<Filter Condition="$(Access) : 'Internal'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Public Properties">
							<Elements>
								<Element Type="Property">
									<Filter Condition="$(Access) == 'Public'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Private Methods">
							<Elements>
								<Element Type="Method">
									<Filter Condition="$(Access) == 'Private' Or $(Access) == 'None'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Protected Methods">
							<Elements>
								<Element Type="Method">
									<Filter Condition="$(Access) == 'Protected'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Internal Methods">
							<Elements>
								<Element Type="Method">
									<Filter Condition="$(Access) : 'Internal'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Public Methods">
							<Elements>
								<Element Type="Method">
									<Filter Condition="$(Access) == 'Public'"/>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Events">
							<Elements>
								<Element Type="Event">
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
						<Region Name="Other">
							<Elements>
								<ElementRef Id="DefaultInterface"/>
								<ElementRef Id="DefaultType"/>
								<Element>
									<Sort By="Name"/>
								</Element>
							</Elements>
						</Region>
					</Elements>
				</Element>
				<!-- End Type -->
			</Elements>
		</Element>
		<!-- End Namespace -->
	</Elements>
</CodeConfiguration>
